home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1999 March / EnigmA AMIGA RUN 35 (1999)(G.R. Edizioni)(IT)[!][issue 1999-03].iso / www / amitrix / httx17.lha / Install-HTTX next >
Text File  |  1998-02-25  |  4KB  |  160 lines

  1. ; $VER: Install httx for aweb 1.1 25.02.98
  2. ; 25 FEB 1998 WHMP
  3. ; Description: Installer script for AWeb-II 3.x extras
  4.  
  5. (set v39 (>= (/ (getversion "exec.library" (resident)) 65536) 39))
  6. (set awv 3)
  7. (set awr 1)
  8. (set #needInst43 "You must use Installer version 43 or greater.  Use the Installer program from your AWeb-II disk.")
  9. (if (< (/ @installer-version 65536) 43)
  10.   (abort #needInst43)
  11. )
  12.  
  13. (set #installing "Installing ")
  14.  
  15. ; offer to back up a file or drawer
  16. (procedure bumprev #bumpfile #bumptxt
  17.   (if (exists #bumpfile)
  18.     (
  19.       (set bump 1)
  20.       (while (exists (cat #bumpfile "_old" bump) ) (set bump (+ bump 1)) )
  21.       (if
  22.         (askbool
  23.           (default 1)
  24.           (prompt (cat "\n\n\nBackup " #bumpfile " as "
  25.               #bumpfile "_old" bump " ?\n\n\n "
  26.           #bumptxt ) )
  27.           (help
  28.             (cat "\n\n\n\"" #bumpfile "\" is about to be over written.\n"
  29.               "\nYou are being given the chance to back it up."
  30.               " If you are unsure select yes... just in case ;-D ."
  31.             )
  32.           )
  33.         )
  34.         ;        (rename #bumpfile (cat #bumpfile "_old" bump))
  35.         ( (set bdest (cat #bumpfile "_old" bump))
  36.           (copyfiles
  37.             (source #bumpfile)
  38.             (dest bdest)
  39.             (all)
  40.           )
  41.         )
  42.       )
  43.     )
  44.   )
  45. )
  46.  
  47. ;add a line to a settings file
  48.  
  49. (procedure addpref #preffile #preftext
  50.   (foreach "ENVARC:AWeb3" "~(program|browser|gui|network|window|settings)"
  51.     (
  52.       (if (= @each-type 2)
  53.         (run (cat "echo >>ENVARC:AWeb3/" @each-name "/" #preffile " \"" #preftext  "\"") )
  54.       )
  55.     )
  56.   )
  57.   (run (cat "echo >>ENVARC:AWeb3/" #preffile " \"" #preftext  "\"") )
  58. )
  59.  
  60. (set #no-aweb-ii
  61.   (cat "You must have completed the AWeb-II 3.1 installation before "
  62.     "you can install the %s plug-in. No AWeb3: assign has been found."
  63.   )
  64. )
  65. (if (not (exists "AWeb3:" (noreq)))
  66.   (abort (#no-aweb-ii "Utilities"))
  67. )
  68.  
  69. (set @default-dest "AWeb3:")
  70. (bumprev "envarc:aweb3"
  71.   (cat "Your previously SAVED AWeb 3.1 configuration"
  72.   " is in this directory.")
  73. ) ; backup any previous AWeb3 prefs
  74.  
  75. (makedir "AWeb3:Plugins/HTTX" (infos))
  76. (set httxdoc
  77.   (askoptions
  78.     (prompt
  79.       "\n\nQuale documentazione di HTTX installo?"
  80.       "\n Install which HTTX documentation ?"
  81.     )
  82.     (help #httx-doc-help)
  83.             (choices "documentazione italiana"
  84.               "English documentation"
  85.             )
  86.     (default 2)
  87.   )
  88. )
  89.  
  90.  
  91.  
  92. (copyfiles
  93.   (source "httx")
  94.   (choices "HTTXPlugin.config" "HTTX.prefs" "HTTXPrt.prefs")
  95.   (dest "env:")
  96. )
  97. (copyfiles
  98.   (source "httx")
  99.   (choices "HTTXPlugin.config" "HTTX.prefs" "HTTXPrt.prefs")
  100.   (dest "envarc:")
  101. )
  102.  
  103.  
  104. (copyfiles
  105.   (source "httx")
  106.   (dest "AWeb3:Plugins/HTTX")
  107.   (all)
  108.   (prompt #installing "HTTX")
  109. )
  110. (protect "AWeb3:Plugins/HTTX/httxplugin.awebrx" "+s")
  111. (protect "AWeb3:Plugins/HTTX/httxplugincfg.awebrx" "+s")
  112. (protect "AWeb3:Plugins/HTTX/httxpluginprt.awebrx" "+s")
  113.  
  114. (delete "AWeb3:Plugins/httx/#?.prefs" )
  115. (delete "AWeb3:Plugins/httx/HTTXPlugin.config" )
  116. (if(not(bitand 2 httxdoc) )    (delete "AWeb3:Plugins/HTTX/HTTX.doc.eng.html")  )
  117. (if(not(bitand 1 httxdoc) )    (delete "AWeb3:Plugins/HTTX/HTTX.doc.ita.html")  )
  118.  
  119. ; Adjust the AWeb.prefs file to use HTTX
  120.  
  121.  
  122. (addpref "gui"
  123.   (cat
  124.             "PUPF 3Save as textRUN AWebPath:Plugins/HTTX/HTTXPlugin.awebrx TARGET %i*N"
  125.             "PUPF 3Print as textRUN AWebPath:Plugins/HTTX/HTTXPluginPrt.awebrx TARGET %i*N"
  126.             "AREX 2;AWebPath:Plugins/HTTX/HTTXPlugin.awebrx;Save As Text (HTTX)*N"
  127.             "AREX 3;AWebPath:Plugins/HTTX/HTTXPluginPrt.awebrx;Print As Text (HTTX)*N"
  128.             "AREX 4;AWebPath:Plugins/HTTX/HTTXPluginCfg.awebrx;HTTX Configuration"
  129.   )
  130. )
  131.  
  132.  
  133.  
  134. (if (= @user-level 2)
  135.   ( bumprev "env:aweb3"
  136.     (cat "Your previous ACTIVE AWeb 3.1 configuration"
  137.     " is in this directory.")
  138.   ) ;backup any active prefs
  139. )
  140.  
  141. (delete "env:aweb3/#?" (all))
  142.  
  143.  
  144. (copyfiles
  145.   (source "ENVARC:AWeb3")
  146.   (dest "ENV:AWeb3")
  147.   (all)
  148. )
  149.  
  150.  
  151. (complete 100)
  152. (set @default-dest "AWeb3:plugins")
  153.  
  154.  
  155. (exit  "\n\n" @app-name
  156.   " is now installed.\n\n"
  157.   "If this is an update instalation be sure to check your GUI and/or ARexx menu"
  158. " settings for duplicate entries.")
  159.  
  160.